Atbash (; also transliterated Atbaš) is a monoalphabetic substitution cipher originally used to encrypt the Hebrew alphabet. It can be modified for use with any known writing system with a standard collation.
Because there is only one way to perform this, the Atbash cipher provides no communications security, as it lacks any sort of key. If multiple collation are available, which one was used in encryption can be used as a key, but this does not provide significantly more security, considering that only a few letters can give away which one was used.
The Atbash cipher for the modern Hebrew alphabet would be:
By shifting the correlation one space to the left or the right, one may derive a variant Batgash (named for Bet–Taw–Gimel–Shin) or Ashbar (for Aleph–Shin–Bet–Resh). Either alternative mapping leaves one letter unsubstituted; respectively Aleph and Taw.
Under the standard affine convention, an alphabet of m letters is mapped to the numbers (The Hebrew alphabet has and the standard Latin alphabet has The Atbash cipher may then be enciphered and deciphered using the encryption function for an affine cipher by setting
This may be simplified to
\mathrm{E}(x) &= (m - 1)(x + 1) \bmod m \\ &= -(x + 1) \bmod m.\end{align}
If, instead, the m letters of the alphabet are mapped to then the encryption and decryption function for the Atbash cipher becomes
|
|